//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Lesser General Public License for more details.
// 
// You should have received a copy of the GNU Lesser General Public License
// along with this program.  If not, see http://www.gnu.org/licenses/.
// 

package songshan_sow_fault;

import ned.IdealChannel;


network topology3
{
    parameters:
        double connectProb = 0.8;
    	@display("bgb=994,636");
    	
    submodules:
        sw0: SW {
            @display("p=179,514");
        }
        dsp0: DSP {
            @display("p=121,573");
        }
        dsp1: DSP {
            @display("p=238,573");
        }
        dsp2: DSP {
            @display("p=121,457");
        }
        dsp3: DSP {
            @display("p=238,457");
        }
        sw1: SW {
            @display("p=432,514");
        }
        dsp6: DSP {
            @display("p=374,457");
        }
        dsp7: DSP {
            @display("p=491,457");
        }
        dsp4: DSP {
            @display("p=374,573");
        }
        dsp5: DSP {
            @display("p=491,573");
        }
        sw2: SW {
            @display("p=685,514");
        }
        dsp11: DSP {
            @display("p=744,457");
        }
        dsp10: DSP {
            @display("p=627,457");
        }
        dsp8: DSP {
            @display("p=627,573");
        }
        dsp9: DSP {
            @display("p=744,573");
        }
        sw4: SW {
            @display("p=432,307");
        }
        dsp14: DSP {
            @display("p=121,250");
        }
        dsp15: DSP {
            @display("p=238,250");
        }
        dsp12: DSP {
            @display("p=121,366");
        }
        dsp19: DSP {
            @display("p=491,250");
        }
        dsp13: DSP {
            @display("p=238,366");
        }
        dsp21: DSP {
            @display("p=744,366");
        }
        dsp18: DSP {
            @display("p=374,250");
        }
        dsp22: DSP {
            @display("p=627,250");
        }
        dsp20: DSP {
            @display("p=627,366");
        }
        dsp17: DSP {
            @display("p=491,366");
        }
        sw3: SW {
            @display("p=179,307");
        }
        dsp23: DSP {
            @display("p=744,250");
        }
        sw5: SW {
            @display("p=685,307");
        }
        dsp16: DSP {
            @display("p=374,366");
        }
        sw8: SW {
            @display("p=685,112");
        }
        dsp32: DSP {
            @display("p=627,171");
        }
        dsp26: DSP {
            @display("p=121,55");
        }
        dsp24: DSP {
            @display("p=121,171");
        }
        dsp28: DSP {
            @display("p=374,171");
        }
        sw7: SW {
            @display("p=432,112");
        }
        dsp35: DSP {
            @display("p=744,55");
        }
        sw6: SW {
            @display("p=179,112");
        }
        dsp30: DSP {
            @display("p=374,55");
        }
        dsp25: DSP {
            @display("p=238,171");
        }
        dsp33: DSP {
            @display("p=744,171");
        }
        dsp27: DSP {
            @display("p=238,55");
        }
        dsp34: DSP {
            @display("p=627,55");
        }
        dsp29: DSP {
            @display("p=491,171");
        }
        dsp31: DSP {
            @display("p=491,55");
        }
    connections:
        
        sw0.SW_inout_gate_local++ <--> IdealChannel <--> dsp3.DSP_inout_gate;
        sw0.SW_inout_gate_local++ <--> IdealChannel <--> dsp1.DSP_inout_gate;
        sw0.SW_inout_gate_local++ <--> IdealChannel <--> dsp0.DSP_inout_gate;
        sw0.SW_inout_gate_local++ <--> IdealChannel <--> dsp2.DSP_inout_gate;
        sw1.SW_inout_gate_local++ <--> IdealChannel <--> dsp7.DSP_inout_gate;
        sw1.SW_inout_gate_local++ <--> IdealChannel <--> dsp5.DSP_inout_gate;
        sw1.SW_inout_gate_local++ <--> IdealChannel <--> dsp4.DSP_inout_gate;
        sw1.SW_inout_gate_local++ <--> IdealChannel <--> dsp6.DSP_inout_gate;
        sw2.SW_inout_gate_local++ <--> IdealChannel <--> dsp11.DSP_inout_gate;
        sw2.SW_inout_gate_local++ <--> IdealChannel <--> dsp9.DSP_inout_gate;
        sw2.SW_inout_gate_local++ <--> IdealChannel <--> dsp8.DSP_inout_gate;
        sw2.SW_inout_gate_local++ <--> IdealChannel <--> dsp10.DSP_inout_gate;
        sw3.SW_inout_gate_local++ <--> IdealChannel <--> dsp15.DSP_inout_gate;
        sw3.SW_inout_gate_local++ <--> IdealChannel <--> dsp13.DSP_inout_gate;
        sw3.SW_inout_gate_local++ <--> IdealChannel <--> dsp12.DSP_inout_gate;
        sw3.SW_inout_gate_local++ <--> IdealChannel <--> dsp14.DSP_inout_gate;
        sw4.SW_inout_gate_local++ <--> IdealChannel <--> dsp19.DSP_inout_gate;
        sw4.SW_inout_gate_local++ <--> IdealChannel <--> dsp17.DSP_inout_gate;
        sw4.SW_inout_gate_local++ <--> IdealChannel <--> dsp16.DSP_inout_gate;
        sw4.SW_inout_gate_local++ <--> IdealChannel <--> dsp18.DSP_inout_gate;
        sw5.SW_inout_gate_local++ <--> IdealChannel <--> dsp23.DSP_inout_gate;
        sw5.SW_inout_gate_local++ <--> IdealChannel <--> dsp21.DSP_inout_gate;
        sw5.SW_inout_gate_local++ <--> IdealChannel <--> dsp20.DSP_inout_gate;
        sw5.SW_inout_gate_local++ <--> IdealChannel <--> dsp22.DSP_inout_gate;
        sw6.SW_inout_gate_local++ <--> IdealChannel <--> dsp27.DSP_inout_gate;
        sw6.SW_inout_gate_local++ <--> IdealChannel <--> dsp25.DSP_inout_gate;
        sw6.SW_inout_gate_local++ <--> IdealChannel <--> dsp24.DSP_inout_gate;
        sw6.SW_inout_gate_local++ <--> IdealChannel <--> dsp26.DSP_inout_gate;
        sw7.SW_inout_gate_local++ <--> IdealChannel <--> dsp31.DSP_inout_gate;
        sw7.SW_inout_gate_local++ <--> IdealChannel <--> dsp29.DSP_inout_gate;
        sw7.SW_inout_gate_local++ <--> IdealChannel <--> dsp28.DSP_inout_gate;
        sw7.SW_inout_gate_local++ <--> IdealChannel <--> dsp30.DSP_inout_gate;
        sw8.SW_inout_gate_local++ <--> IdealChannel <--> dsp35.DSP_inout_gate;
        sw8.SW_inout_gate_local++ <--> IdealChannel <--> dsp33.DSP_inout_gate;
        sw8.SW_inout_gate_local++ <--> IdealChannel <--> dsp32.DSP_inout_gate;
        sw8.SW_inout_gate_local++ <--> IdealChannel <--> dsp34.DSP_inout_gate;

    	
    	sw0.SW_inout_gate_east <--> IdealChannel <--> sw1.SW_inout_gate_west;
    	
        sw3.SW_inout_gate_east <--> IdealChannel <--> sw4.SW_inout_gate_west;
        
        sw6.SW_inout_gate_east <--> IdealChannel <--> sw7.SW_inout_gate_west;
        sw7.SW_inout_gate_east <--> IdealChannel <--> sw8.SW_inout_gate_west;
        
        sw7.SW_inout_gate_south <--> IdealChannel <--> sw4.SW_inout_gate_north;
        sw8.SW_inout_gate_south <--> IdealChannel <--> sw5.SW_inout_gate_north;
        sw3.SW_inout_gate_south <--> IdealChannel <--> sw0.SW_inout_gate_north;
        sw4.SW_inout_gate_south <--> IdealChannel <--> sw1.SW_inout_gate_north;
    	sw5.SW_inout_gate_south <--> IdealChannel <--> sw2.SW_inout_gate_north;
}
